// compoments/myinfo/myinfo.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
      url:'/static/image/tou.png',
      name:'肖二拾',
      sign:'hahahhaahahahahaha',
    show: false,
    activeNames: ['0'],
  },
  onLoad(options) {
    this.getInfo()
  },

  /**
   * 组件的方法列表
   */
  methods: {
    showPopup() {
      this.setData({ show: true });
    },
    onChange(event) {
      this.setData({
        activeNames: event.detail,
      });
    },
    onClose() {
      this.setData({ show: false });
    },
    getInfo() {
      wx.getStorageSync('userInfo')({
        key: 'userInfo',
        success(res){
          console.log(res);
          this.setData({
            url : res.url,
            name: res.name
          })
        }
      })
    },
  }
})
